package novel.front.novellist.entity;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

public class LiebaoApp implements Serializable{
    private Integer id;

    private Integer appId;

    private String appName;

    private String appSum;

    private String appDesc;

    private String tagsArr;

    private String author;

    private String appUpdate;

    private String pinyin;

    private String hot;

    private String qrUrl;

    private String logoUrl;

    private String scrUrlsArr;


    private String name;

    private String sum;

    private String desc;

    private List<String> tags ;

    private List<String> scrUrls ;

    private String searchTags;

    private Integer sourceId;

    private String sourceUrl;

    private Integer homeType;

    private String pageUrl;

    private Integer category;

    private String qq;

    private Integer isCheck;

    private Date createTime;

    private Integer categoryId;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
        this.appName=name;
    }

    public String getSum() {
        return sum;
    }

    public void setSum(String sum) {
        this.sum = sum;
        this.appSum=sum;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
        this.appDesc=desc;
    }

    public List<String> getTags() {
        if(this.getTagsArr()==null)
        {
            return null;
        }
        String s=this.getTagsArr();
        String[] ss=this.getTagsArr().split(",");
        List<String> sss=Arrays.asList(this.getTagsArr().split(","));
        return Arrays.asList(this.getTagsArr().split(","));
    }

    public void setTags(List<String> tags) {
        this.tags = tags;
        if(this.tagsArr==null||this.tagsArr.equals("")) {
           this.tagsArr=tags.toString().substring(1,tags.toString().length()-1);
        }
    }

    public List<String> getScrUrls() {
        return scrUrls;
    }

    public void setScrUrls(List<String> scrUrls) {
        this.scrUrls = scrUrls;
        if(this.scrUrlsArr==null||this.scrUrlsArr.equals("")) {
            this.scrUrlsArr = scrUrls.toString().substring(1,scrUrls.toString().length()-1);
        }
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
        this.appId=id;
    }

    public Integer getAppId() {
        return appId;
    }

    public void setAppId(Integer appId) {
        this.appId = appId;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName == null ? null : appName.trim().replace(",","");
    }

    public String getAppSum() {
        return appSum;
    }

    public void setAppSum(String appSum) {
        this.appSum = appSum == null ? null : appSum.trim();
    }

    public String getAppDesc() {
        return appDesc;
    }

    public void setAppDesc(String appDesc) {
        this.appDesc = appDesc == null ? null : appDesc.trim();
    }

    public String getTagsArr() {
        return tagsArr;
    }

    public void setTagsArr(String tagsArr) {
        this.tagsArr = tagsArr == null ? null : tagsArr.trim();
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author == null ? null : author.trim();
    }

    public String getAppUpdate() {
        return appUpdate;
    }

    public void setAppUpdate(String appUpdate) {
        this.appUpdate = appUpdate;
    }

    public String getPinyin() {
        return pinyin;
    }

    public void setPinyin(String pinyin) {
        this.pinyin = pinyin == null ? null : pinyin.trim();
    }

    public String getHot() {
        return hot;
    }

    public void setHot(String hot) {
        this.hot = hot == null ? null : hot.trim();
    }

    public String getQrUrl() {
        return qrUrl;
    }

    public void setQrUrl(String qrUrl) {
        this.qrUrl = qrUrl == null ? null : qrUrl.trim();
    }

    public String getLogoUrl() {
        return logoUrl;
    }

    public void setLogoUrl(String logoUrl) {
        this.logoUrl = logoUrl == null ? null : logoUrl.trim();
    }

    public String getScrUrlsArr() {
        return scrUrlsArr;
    }

    public void setScrUrlsArr(String scrUrlsArr) {
        this.scrUrlsArr = scrUrlsArr == null ? null : scrUrlsArr.trim();
    }

    public String getSearchTags() {
        return searchTags;
    }

    public void setSearchTags(String searchTags) {
        this.searchTags = searchTags;
    }

    public Integer getSourceId() {
        return sourceId;
    }

    public void setSourceId(Integer sourceId) {
        this.sourceId = sourceId;
    }

    public String getSourceUrl() {
        return sourceUrl;
    }

    public void setSourceUrl(String sourceUrl) {
        this.sourceUrl = sourceUrl;
    }

    public Integer getHomeType() {
        return homeType;
    }

    public void setHomeType(Integer homeType) {
        this.homeType = homeType;
    }

    public String getPageUrl() {
        return pageUrl;
    }

    public void setPageUrl(String pageUrl) {
        this.pageUrl = pageUrl;
    }

    public Integer getCategory() {
        return category;
    }

    public void setCategory(Integer category) {
        this.category = category;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public Integer getIsCheck() {
        return isCheck;
    }

    public void setIsCheck(Integer isCheck) {
        this.isCheck = isCheck;
    }

    public String  getCreateTime() {
        String dd = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
        if(createTime!=null){
            dd = new SimpleDateFormat("yyyy-MM-dd").format(createTime);
        }
        return dd;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }
}